Add tutorials on UDEs with neural network rates#1489
Open
TorkelE wants to merge 23 commits into
Open
Conversation
Updated the prob_func to remove an unused parameter.
sebapersson
reviewed
Jul 9, 2026
sebapersson
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding, I think it looks good! Left a few minor comments
| Lux.Dense(3 => 1, Lux.softplus, use_bias = false), | ||
| ) | ||
| @SymbolicNeuralNetwork U, θ = nn_arch | ||
| A(z) = U(z, θ)[1] |
Contributor
There was a problem hiding this comment.
Maybe use U([z, ]) syntax, makes it easier to understand how to have more than a single input to the neural network
| ``` | ||
| Here, `U` represents the neural network structure, and `θ` represents its parameters. Additional options for using the `@SymbolicNeuralNetwork` macro are described [here](https://sciml.github.io/ModelingToolkitNeuralNets.jl/stable/api/#ModelingToolkitNeuralNets.@SymbolicNeuralNetwork) and [here](https://sciml.github.io/ModelingToolkitNeuralNets.jl/stable/symbolic_ude_tutorial/). Next, using the following syntax, we can [interpolate](@ref dsl_advanced_options_symbolics_and_DSL_interpolation) this function approximator as a Catalyst model rate. | ||
| ```@example ude_rate_based | ||
| A(z) = U(z, θ)[1] |
|
|
||
| The UDE model can now be fitted to the data. Here, we use the Adam implementation from the | ||
| [Optimisers.jl](https://github.com/FluxML/Optimisers.jl) package, running 5 independent starts | ||
| with 10,000 iterations each. |
Contributor
There was a problem hiding this comment.
Suggested change
| with 10,000 iterations each. | |
| with 10,000 iterations/epochs each. |
| ### [Learning parameters or observables using neural networks](@id udes_parameters_n_observables) | ||
| Throughout this tutorial, we have shown how neural networks can be incorporated into | ||
| Catalyst models to learn unknown functions of system variables within the main model | ||
| system. PEtab, however, also supports two additional ways to incorporate neural networks |
Contributor
There was a problem hiding this comment.
Suggested change
| system. PEtab, however, also supports two additional ways to incorporate neural networks | |
| system. PEtab.jl, however, also supports two additional ways to incorporate neural networks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging will likely require #1488 to be finished first (which in turn is waiting for the next OrdinaryDiffEq release).